package cn.supermaster.management.web.service.task;

import cn.supermaster.management.common.page.TableDataInfo;
import cn.supermaster.management.common.response.WebResponse;
import cn.supermaster.management.schedule.domain.ScheduleTask;
import org.springframework.ui.ModelMap;

/**
 * All rights Reserved, Designed By www.super-bytecode.com
 *
 * @ProjectName: supermaster-management
 * @Package: cn.supermaster.management.web.service.task
 * @ClassName: IScheduleTaskService
 * @Description: []
 * <p> </p>
 * @Author: [Lance Ting]
 * @Date: 2021/2/16 16:39
 * @Version: V1.0
 * @Copyright: 2021 www.super-bytecode.com Inc. All rights reserved.
 * TODO: 注意,本文件Lance Ting所作,如果转载或使用请标明具体出处!
 **/
public interface ISTaskService {

    /*
     * ================================================
     *  页面跳转功能实现
     * ================================================
     */

    /**
     * @Description: [页面跳转首页]
     * <p></P>
     * @Title: skipScheduleTaskIndex
     * @Author: Lance Ting
     * @Date: 2021-02-16
     * @Return: java.lang.String
     */
    String skipScheduleTaskIndex();

    /**
     * @Description: [跳转到详情界面]
     * <p></P>
     * @Title: skipScheduleTaskDetailsHtml
     * @Author: Lance Ting
     * @Date: 2021-02-16
     * @Param: modelMap
     * @Param: taskId
     * @Return: java.lang.String
     */
    String skipScheduleTaskDetailsHtml(ModelMap modelMap, Long taskId);

    /**
     * @Description: [新增调度界面]
     * <p></P>
     * @Title: skipAddScheduleTaskHtml
     * @Author: Lance Ting
     * @Date: 2021-02-16
     * @Return: java.lang.String
     */
    String skipAddScheduleTaskHtml();

    /**
     * @Description: [修改调度任务界面]
     * <p></P>
     * @Title: skipModifyScheduleTaskHtml
     * @Author: Lance Ting
     * @Date: 2021-02-16
     * @Param: modelMap
     * @Param: taskId
     * @Return: java.lang.String
     */
    String skipModifyScheduleTaskHtml(ModelMap modelMap, Long taskId);

    /*
     * ================================================
     *  Rest功能实现
     * ================================================
     */

    /**
     * @Description: [根据条件获取任务信息列表]
     * <p></P>
     * @Title: queryScheduleTaskByCondition
     * @Author: Lance Ting
     * @Date: 2021-02-16
     * @Param: task
     * @Return: cn.supermaster.management.common.page.TableDataInfo
     */
    TableDataInfo queryScheduleTaskByCondition(ScheduleTask task);

    /**
     * @Description: [到处数据列表]
     * <p></P>
     * @Title: doExportScheduleTask
     * @Author: Lance Ting
     * @Date: 2021-02-16
     * @Param: task
     * @Return: cn.supermaster.management.common.response.WebResult
     */
    WebResponse doExportScheduleTask(ScheduleTask task);

    /**
     * @Description: [删除定时任务]
     * <p></P>
     * @Title: removeScheduleTasks
     * @Author: Lance Ting
     * @Date: 2021-02-16
     * @Param: ids
     * @Return: cn.supermaster.management.common.response.WebResult
     * @Throws:
     */
    WebResponse removeScheduleTasks(String ids);

    /**
     * @Description: [修改执行计划状态]
     * <p></P>
     * @Title: doChangeTaskStatus
     * @Author: Lance Ting
     * @Date: 2021-02-16
     * @Param: task
     * @Return: cn.supermaster.management.common.response.WebResult
     */
    WebResponse doChangeTaskStatus(ScheduleTask task);

    /**
     * @Description: [任务调度立即执行一次]
     * <p></P>
     * @Title: doScheduleTaskRunning
     * @Author: Lance Ting
     * @Date: 2021-02-19
     * @Param: task
     * @Return: cn.supermaster.management.common.response.WebResult
     */
    WebResponse doScheduleTaskRunning(ScheduleTask task);

    /**
     * @Description: [新增保存调度]
     * <p></P>
     * @Title: addScheduleTaskSave
     * @Author: Lance Ting
     * @Date: 2021-02-19
     * @Param: task
     * @Return: cn.supermaster.management.common.response.WebResult
     */
    WebResponse addScheduleTaskSave(ScheduleTask task);

    /**
     * @Description: [修改保存调度]
     * <p></P>
     * @Title: modifyScheduleTask
     * @Author: Lance Ting
     * @Date: 2021-02-19
     * @Param: task
     * @Return: cn.supermaster.management.common.response.WebResult
     */
    WebResponse modifyScheduleTask(ScheduleTask task);

    /**
     * @Description: [校验cron表达式是否有效]
     * <p></P>
     * @Title: checkCronExpressionValid
     * @Author: Lance Ting
     * @Date: 2021-02-19
     * @Param: task
     * @Return: boolean
     */
    boolean checkCronExpressionValid(ScheduleTask task);
}